Replication archive for Coppock, Alexander, Donald P. Green, and Ethan Porter. 2022. ``Does Digital Advertising Affect Vote Choice? Evidence from a Randomized Field Experiment'' Research & Politics. Forthcoming.

# Contents

This archive contains nine analysis scripts:

CGP_2022_bayesian_learning.R
CGP_2022_design_diagnosis.R
CGP_2022_design_tests.R
CGP_2022_equivalence_tests.R
CGP_2022_in_text_calculations.R
CGP_2022_precinct_level_analysis_CD.R
CGP_2022_precinct_level_analysis.R
CGP_2022_precinct_level_randomization_inference.R
CGP_2022_zip_code_level_analysis.R

These scripts depend on two data files:

CGP_2022_precinct_level.rds
CGP_2022_zip_code_level.rds

# Installation

Some add-on packages for R are required to run this replication archive. 
Use the following to install them all:

install.packages(c("tidyverse", "DeclareDesign", "xtable", "texreg"))

# system information

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] xtable_1.8-4         texreg_1.37.5        DeclareDesign_0.28.0 estimatr_0.30.2      fabricatr_0.14.0     randomizr_0.20.0    
 [7] forcats_0.5.1        stringr_1.4.0        dplyr_1.0.7          purrr_0.3.4          readr_2.0.0          tidyr_1.1.4         
[13] tibble_3.1.5         ggplot2_3.3.5        tidyverse_1.3.1     

loaded via a namespace (and not attached):
 [1] fs_1.5.0           lubridate_1.7.10   bit64_4.0.5        httr_1.4.2         tools_4.1.1        backports_1.3.0    utf8_1.2.2        
 [8] R6_2.5.1           DBI_1.1.1          colorspace_2.0-2   withr_2.4.2        tidyselect_1.1.1   bit_4.0.4          curl_4.3.2        
[15] compiler_4.1.1     textshaping_0.3.5  cli_3.1.0          rvest_1.0.1        xml2_1.3.2         labeling_0.4.2     scales_1.1.1      
[22] systemfonts_1.0.2  digest_0.6.28      foreign_0.8-81     rmarkdown_2.10     rio_0.5.27         pkgconfig_2.0.3    htmltools_0.5.2   
[29] parallelly_1.28.1  dbplyr_2.1.1       fastmap_1.1.0      highr_0.9          rlang_0.4.12       readxl_1.3.1       rstudioapi_0.13   
[36] farver_2.1.0       generics_0.1.1     jsonlite_1.7.2     vroom_1.5.3        zip_2.2.0          car_3.0-11         magrittr_2.0.1    
[43] Formula_1.2-4      Rcpp_1.0.7         munsell_0.5.0      fansi_0.5.0        abind_1.4-5        lifecycle_1.0.1    stringi_1.7.5     
[50] carData_3.0-4      grid_4.1.1         parallel_4.1.1     listenv_0.8.0      crayon_1.4.2       haven_2.4.3        hms_1.1.1         
[57] knitr_1.36         pillar_1.6.4       future.apply_1.8.1 codetools_0.2-18   reprex_2.0.1       glue_1.4.2         evaluate_0.14     
[64] data.table_1.14.0  modelr_0.1.8       vctrs_0.3.8        tzdb_0.1.2         cellranger_1.1.0   gtable_0.3.0       future_1.23.0     
[71] assertthat_0.2.1   xfun_0.26          openxlsx_4.2.4     broom_0.7.10       ragg_1.1.3         globals_0.14.0     ellipsis_0.3.2  